Conditions | 1 |
Total Lines | 20 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | // Type definitions for utf8-buffer 1.0.0 |
||
2 | // Project: https://github.com/rochars/byte-data |
||
3 | // Definitions by: Rafael da Silva Rocha <https://github.com/rochars> |
||
4 | // Definitions: https://github.com/rochars/utf8-buffer |
||
5 | |||
6 | /** |
||
7 | * Read a string of UTF-8 characters from a byte buffer. |
||
8 | * Invalid characters are replaced with 'REPLACEMENT CHARACTER' (U+FFFD). |
||
9 | * @see https://encoding.spec.whatwg.org/#the-encoding |
||
10 | * @see https://stackoverflow.com/a/34926911 |
||
11 | * @param {!Uint8Array|!Array<number>} buffer A byte buffer. |
||
12 | * @param {number=} start The buffer index to start reading. |
||
13 | * @param {?number=} end The buffer index to stop reading. |
||
14 | * Assumes the buffer length if undefined. |
||
15 | * @return {string} |
||
16 | */ |
||
17 | export function unpack( |
||
18 | buffer: Uint8Array|number[], |
||
19 | start: number, |
||
20 | end?: number): string; |
||
21 | |||
34 |